]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Filter out newlines when unexpanded
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 10 Mar 2015 22:36:09 +0000 (23:36 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 10 Mar 2015 22:44:35 +0000 (23:44 +0100)
Enabling line-wrapping of the unexpanded body is not enough to enforce
a single line when the text has embedded newlines, so replace these with
spaces (this is similar to setting ClutterText:single-line-mode, however
that would use a paragraph separator glyph instead).

js/ui/calendar.js

index 22c0c2c1302651e3b38a615cd4cd2f0b45f69e6a..19d154ad2d76bdb4f9585acbc81c04854e4195c9 100644 (file)
@@ -1044,7 +1044,7 @@ const Message = new Lang.Class({
 
     setBody: function(text) {
         this._bodyText = text;
-        this.bodyLabel.setMarkup(text, this._useBodyMarkup);
+        this.bodyLabel.setMarkup(text.replace(/\n/g, ' '), this._useBodyMarkup);
     },
 
     setUseBodyMarkup: function(enable) {